package com.electric.qrapp.utils.view

import android.content.Context
import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import com.electric.qrapp.R


class LoadingDialog(context: Context) : AlertDialog(context, R.style.transparentDialog) {
    private val tvTip: TextView by lazy {
        findViewById<TextView>(R.id.tv_tip)!!
    }
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.dialog_loading)
        setCanceledOnTouchOutside(false)

    }

    fun setText(msg: String) {
        tvTip.text = msg
    }

}

